package com.example.vo;

import lombok.Data;

import java.math.BigDecimal;

@Data
public class BOMLinkQuerySonItemResultVO implements Cloneable{
    String bomLinkId;
    String sourcePartVersionId;
    String sourceName;
    String targetPartMasterId;
    String targetName;
    BigDecimal quantity;
    String referenceDesignator;

    @Override
    public BOMLinkQuerySonItemResultVO clone() {
        try {
            BOMLinkQuerySonItemResultVO cloned = (BOMLinkQuerySonItemResultVO) super.clone();
            // 如果有可变对象，需要手动复制
            if (this.quantity != null) {
                cloned.quantity = new BigDecimal(this.quantity.toString());
            }
            return cloned;
        } catch (CloneNotSupportedException e) {
            throw new AssertionError(); // 不应该发生，因为我们实现了 Cloneable
        }
    }
}
